from django.db import models

# Create your models here.

class Card(models.Model):
    name = models.CharField(max_length=200, blank=True, null=True)
    push_time = models.DateTimeField(blank=True, null=True)
    work_time = models.DateTimeField(blank=True, null=True)
    off_time = models.DateTimeField(blank=True, null=True)
    fen = models.CharField(max_length=200, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'card'

class Department(models.Model):
    name = models.CharField(max_length=200, blank=True, null=True)
    sid = models.ForeignKey('self', models.DO_NOTHING, db_column='sid', blank=True, null=True)

    class Meta:
        db_table = 'department'


class User(models.Model):
    name = models.CharField(max_length=200, blank=True, null=True)
    fen = models.FloatField(blank=True, null=True)
    is_work = models.IntegerField(default=0)
    upgrade = models.IntegerField(default=0)
    did = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'user'